import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';

class OtherCourse extends StatefulWidget {
  OtherCourse({Key key, this.url}) : super(key: key);

  final String url;

  @override
  State<StatefulWidget> createState() {
    return OtherCourseState();
  }
}

class OtherCourseState extends State<OtherCourse> {
  @override
  void initState() {
    super.initState();
  }
  
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          elevation: 0,
          backgroundColor: Colors.white,
          title: Text("课程详情",style: TextStyle(color: Color.fromRGBO(51, 51, 51, 1)),),
          leading: FlatButton(
            child: Icon(
              Icons.arrow_back_ios,
              color: Colors.grey,
            ),
            onPressed: () {
              Navigator.pop(context);
            },
          ),
        ),
        body: WebView(
          initialUrl: widget.url,
          javascriptMode: JavascriptMode.unrestricted,
        )
    );
  }

  @override
  void dispose() {
    super.dispose();
  }
}
